//
//  SinaHomeRefreshCountBar.m
//  MySinaWeiboProjectForOC
//
//  Created by apple on 2016/11/23.
//  Copyright © 2016年 WangChen. All rights reserved.
//

#import "SinaHomeRefreshCountBar.h"

@interface SinaHomeRefreshCountBar ()

@property (nonatomic,weak) UILabel *countLbl;

@end

@implementation SinaHomeRefreshCountBar


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}



-(void)setupUI{
    
    self.backgroundColor = [UIColor orangeColor];
    
    UILabel *countLbl = [[UILabel alloc]init];
    _countLbl = countLbl;
    [self addSubview:countLbl];
    countLbl.text = @"更新了0条微博";
    countLbl.textColor = [UIColor darkGrayColor];
    countLbl.font = [UIFont systemFontOfSize:18];
    
    [countLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self);
    }];
    
}



-(void)setRefreshCount:(NSInteger)refreshCount{
    
    _refreshCount = refreshCount;
    self.countLbl.text = [NSString stringWithFormat:@"更新了%zd条微博",refreshCount];
    
}




@end
